﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Xml;
using System.Xml.Xsl;
using System.Xml.XPath;

public partial class NSFConverter : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        XPathDocument myXPathDoc = new XPathDocument(Server.MapPath("NSFBudgetHistory.xml"));
        XslTransform myXslTrans = new XslTransform();
        myXslTrans.Load(Server.MapPath("RevisedNSFFundingTrans.xslt"));
        XmlTextWriter myWriter = new XmlTextWriter(Server.MapPath("CDFNSF.xml"), null);
        myXslTrans.Transform(myXPathDoc, null, myWriter);
        myWriter.Close();
    }
}